#ifndef _WMI_DISK_H
#define _WMI_DISK_H

/******************************************************************************
** @file	wmi_disk.h
** @author	Andrea Herbas
** @author	Nestor Felipe
** @date	Ago 09, 2010
**
** @desc	This class represent a pc dirve using win32_logicalDisk.
*			
**
******************************************************************************/

#include <Wbemidl.h>
#include <comdef.h>
#include "wmi_filedirectory.h"
#include "wmi_iwinobject.h"
#include "wmi_constants.h"
#include <vector>
#include <string>
#include <log4cxx\logger.h>
#include <log4cxx\xml\domconfigurator.h>

class WMI_Disk : public WMI_IWinObject
{
public:
    /**
    * WMI_Disk constructor initilize all properties.
    *
    * @param IWbemClassObject* pointer to a IWbemClassObject instance.
    *        Used to build an WMI_FileDirectory.
    */
    WMI_Disk(IWbemClassObject*);

    /**
    * Sets an alias of a WMI_Disk.
    *
    * @name alias given to a pc drive on a computer.
    */
    void 
    setName(wstring& name)
    {
        _name = name;
    }

    /**
    * Returns the alias given to a drive on a computer.
    * 
    * @return the alias of a drive.
    */
    wstring& 
    getName()
    {
        return _name;
    }

    /**
    * Sets a short description of the resource.
    *
    * @param caption is a one line description of the resource.
    */
    void 
    setCaption(wstring& caption)
    {
        _caption = caption;
    }

    /**
    * Retrieves the value of the caption attribute.
    *
	* @return caption that is a one line description of the resource.
	*/
    wstring& 
    getCaption()
    {
        return _caption;
    }

    /**
    * Sets the File system on the logical disk. Example: "NTFS"
    *
    * @param filesystem type
    */
    void 
    setFileSystem(wstring& fs)
    {
        _fileSystem = fs;
    }

    /**
    * Return the filesystem of a logicall disk
    *
    * @return a string with the filesystem name.
    */
    wstring& 
    getFileSystem()
    {
        return _fileSystem;
    }  

    /**
    * Loads the properties to this object.
    *
    * @param IWbemClassObject* pointer to a IWbemClassObject instance.
    */
    void setProperties(IWbemClassObject*);

    /**
    * Put the object in a valid string, generally to be displayed.
    */
    void print();

private:
    /**
    * List of file directories.
    */
    vector<WMI_FileDirectory*> _fileDirectories;

    /**
    * Label by which the logical drive is known.
    */
    wstring _name;

    /**
    * Short description of the of the logical disk string.
    */
    wstring _caption;

    /**
    * File system on the logical disk. Example: "NTFS"
    */
    wstring _fileSystem;
};

#endif